def f2():
    with open("Walden.txt",mode='r+',encoding="utf-8") as wj:
        a = wj.read()
        a = a.lower()
        a = str(a)
        b = ""
        for i in range(0,len(a)):
            d =""
            if(ord(a[i]) >= 97 and ord(a[i]) <= 122):
                d += a[i]
                b += ''.join(d)
            elif (ord(a[i]) == 32):
                b += " "
        c = b.split()
        for i in c:
            print(i, b.count(i))
    return 0
f2()
